SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].ZonasUpdateCommand
(
	@ID numeric(10, 0),
	@ZONA varchar(150),
	@COMENTARIO varchar(300),
	@Original_ID numeric(10, 0),
	@Original_ZONA varchar(150),
	@IsNull_COMENTARIO Int,
	@Original_COMENTARIO varchar(300)
)
AS
	SET NOCOUNT OFF;
UPDATE [ZONAS] SET [ID] = @ID, [ZONA] = @ZONA, [COMENTARIO] = @COMENTARIO WHERE (([ID] = @Original_ID) AND ([ZONA] = @Original_ZONA) AND ((@IsNull_COMENTARIO = 1 AND [COMENTARIO] IS NULL) OR ([COMENTARIO] = @Original_COMENTARIO)));
	
SELECT ID, ZONA, COMENTARIO FROM ZONAS WHERE (ID = @ID)
GO
